<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::group(['prefix'=>'admin','namespace'=>'Admin',],function (){
    //用户登录页面路由
    Route::get('login','UserController@login');
    //用户登录执行路由
    Route::post('doLogin','UserController@doLogin');
});

Route::group(['prefix'=>'admin','namespace'=>'Admin','middleware'=>'isLogin'],function (){
    //用户后台首页路由
    Route::get('index','UserController@index');
    //后台欢迎页
    Route::get('welcome','UserController@welcome');
    //后台退出登录
    Route::get('logout','UserController@logout');
    //后台用户模块相关路由
    Route::resource('user','AdminController');
});